package com.whccb.apps.office.document.util;

import java.util.HashMap;
import java.util.Map;

import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
import com.actionsoft.sdk.local.SDK;

public class DictUtil {
	private static final String sourceAppId = "com.actionsoft.apps.dict";
	private static final String aslp = "aslp://com.actionsoft.apps.dict/valueOfKV";

	public static String getDictValue(String dictKey, String itemNo) {
		String backValue = "";
		Map<String, Object> params = new HashMap<>();
		params.put("dictKey", dictKey);
		params.put("itemNo", itemNo);
		ResponseObject ro = SDK.getAppAPI().callASLP(SDK.getAppAPI().getAppContext(sourceAppId), aslp, params);
		if (ro != null && ro.isOk()) {
			backValue = ro.get("name") + "";
		}
		return backValue;
	}
}
